<?php
/**
 * CreateTime: 2022/5/6 13:51
 */

namespace App\Tools\DingTalk\DingTalkCover;


use Darabonba\OpenApi\Models\Config;
 
trait DingTalkCoverBasic
{
    /**
     * 新版钉钉 客户端
     * @return Dingtalk
     */
    private static function setCoverDingTalkClient(): Dingtalk
    {
        $config = new Config([]);
        $config->protocol = "https";
        $config->regionId = "central";
        return new Dingtalk($config);
    }


    /**
     * 新版 获取钉钉客户端
     * @return \AlibabaCloud\SDK\Dingtalk\Voauth2_1_0\Dingtalk
     */
    protected static function getDingTalkCoverClient(): Dingtalk
    {
        return self::setCoverDingTalkClient();
    }
}